function inital1() {
    $("#jqGrid").jqGrid({
        url: baseURL + 'sys/sysAgent/list',
        datatype: "json",
        colModel: [
            {
                label: '推荐码',
                name: 'agentId',
                index: "agent_id",
                width: 45,
                align: "center",
                key: true,
                sortable: false
            },
            {label: '渠道名称', name: 'deptName', align: "center", width: 75, sortable: false},
            {label: '合伙人姓名', name: 'name', align: "center", width: 60, sortable: false},
            {
                label: '角色',
                name: 'type',
                align: "center",
                width: 45,
                formatter: function (value, options, row) {
                    return value === 2 ? '普通' : '盟主'
                },
                sortable: false
            },
            {label: '手机号码', name: 'phone', align: "center", width: 75, sortable: false},
            {
                label: '推荐人',
                name: 'parentName',
                align: "center",
                width: 60,
                formatter: function (value, options, row) {
                    return value == null ? '无' : value;
                },
                sortable: false
            },
            {
                label: '推荐人手机',
                name: 'parentPhone',
                align: "center",
                width: 70,
                formatter: function (value, options, row) {
                    return value == null ? '无' : value;
                },
                sortable: false
            },
            {
                label: '账户总分润',
                name: 'totalAmount',
                align: "center",
                width: 65,
                formatter: function (value, options, row) {
                    if (value == 0 || value == null) {
                        return '0.00';
                    }
                    return value;
                },
                sortable: false
            },
            {
                label: '账户余额',
                name: 'availableAmount',
                align: "center",
                width: 65,
                formatter: function (value, options, row) {
                    if (value == 0 || value == null) {
                        return '0.00';
                    }
                    return value;
                },
                sortable: false
            },
            {
                label: '冻结资金',
                name: 'freeznAmount',
                align: "center",
                width: 45,
                formatter: function (value, options, row) {
                    if (value == 0 || value == null) {
                        return '0.00';
                    }
                    return value;
                },
                sortable: false
            },
            {label: '上月激活', name: 'activNum', align: "center", width: 60},
            {
                label: 'vip',
                name: 'thisGrade',
                align: "center",
                width: 40,
                formatter: function (value, options, row) {
                    return value;
                }
            },
            {
                label: '分润费率',
                name: 'agentId',
                align: "center",
                width: 45,
                formatter: function (value, options, row) {
                    return '<span class = "btn btn-success" onclick = "showRate(' + value + ')"> 查看 </span>';
                }
            },
            {
                label: '登录状态',
                name: 'state',
                align: "center",
                width: 60,
                formatter: function (value, options, row) {
                    return value == 2 ?
                        '<span class="label label-danger">禁用</span>' :
                        value == 1 ? '<span class="label label-success">正常</span>' : '<span class="label label-danger">禁止提现</span>';
                },
                sortable: false
            },
            {
                label: '验证状态',
                name: 'realName',
                align: "center",
                width: 50,
                sortable: false,
                formatter: function (value, options, row) {
                    return '<span class = "btn btn-success" onclick = "updateRealName(' + row.agentId + ',\'' + value + '\')"> ' + (value == 1 ? '已认证' : '未认证') + '</span>';
                }
            },
            {
                label: '达标状态',
                name: 'standardState',
                align: "center",
                width: 50,
                sortable: false,
                formatter: function (value, options, row) {
                    return value == 1 ? "合格" : "-";
                }
            },
            {
                label: '账号创建时间',
                name: 'createTime',
                align: "center",
                index: "create_time",
                width: 70,
                sortable: false
            },
            {
                label: '操作', name: 'agentId', width: 100, formatter: function (value, options, row) {
                    return '<span class = "btn btn-warning" onclick = "forbidAgent(' + value + ')"> 封禁 </span>&nbsp;&nbsp;' +

                        '<span class = "btn btn-success" onclick = "toUpdate(' + value + ')"> 修改 </span>&nbsp;&nbsp;';
                }, sortable: false
            }

        ],
        viewrecords: true,
        height: 500,
        rowNum: 10,
        rowList: [10, 30, 50],
        rownumbers: true,
        rownumWidth: 25,
        autowidth: true,
        footerrow: true,
        pager: "#jqGridPager",
        jsonReader: {
            root: "page.list",
            page: "page.currPage",
            total: "page.totalPage",
            records: "page.totalCount"
        },
        prmNames: {
            page: "page",
            rows: "limit",
            order: "order"
        },
        gridComplete: function () {
            //隐藏grid底部滚动条
            $("#jqGrid").closest(".ui-jqgrid-bdiv").css({"overflow-x": "hidden"});
            //计算余额总额，置于表格底部
            var totalAmount = $("#jqGrid").getCol('totalAmount', false, 'sum');
            var availableAmount = $("#jqGrid").getCol('availableAmount', false, 'sum');
            var freeznAmount = $("#jqGrid").getCol('freeznAmount', false, 'sum');
            $("#jqGrid").footerData('set', {
                parentPhone: '当前页总计:',
                totalAmount: "<span style='color:red;'>" + totalAmount.toFixed(2) + "</span>",
                availableAmount: "<span style='color:red;'>" + availableAmount.toFixed(2) + "</span>",
                freeznAmount: "<span style='color:red;'>" + freeznAmount.toFixed(2) + "</span>"
            });
        }
    })
}

function inital2() {

    $("#jqGrid").jqGrid({
        url: baseURL + 'sys/sysAgent/list',
        datatype: "json",
        colModel: [
            {
                label: '推荐码',
                name: 'agentId',
                index: "agent_id",
                width: 45,
                align: "center",
                key: true,
                sortable: false
            },
            {label: '渠道名称', name: 'deptName', align: "center", width: 75, sortable: false},
            {label: '合伙人姓名', name: 'name', align: "center", width: 60, sortable: false},
            {
                label: '角色',
                name: 'type',
                align: "center",
                width: 45,
                formatter: function (value, options, row) {
                    return value === 2 ? '普通' : '盟主'
                },
                sortable: false
            },
            {label: '手机号码', name: 'phone', align: "center", width: 75, sortable: false},
            {
                label: '推荐人',
                name: 'parentName',
                align: "center",
                width: 60,
                formatter: function (value, options, row) {
                    return value == null ? '无' : value;
                },
                sortable: false
            },
            {
                label: '推荐人手机',
                name: 'parentPhone',
                align: "center",
                width: 70,
                formatter: function (value, options, row) {
                    return value == null ? '无' : value;
                },
                sortable: false
            },
            {
                label: '账户总分润',
                name: 'totalAmount',
                align: "center",
                width: 65,
                formatter: function (value, options, row) {
                    if (value == 0 || value == null) {
                        return '0.00';
                    }
                    return value;
                },
                sortable: false
            },
            {
                label: '账户余额',
                name: 'availableAmount',
                align: "center",
                width: 65,
                formatter: function (value, options, row) {
                    if (value == 0 || value == null) {
                        return '0.00';
                    }
                    return value;
                },
                sortable: false
            },
            {
                label: '冻结资金',
                name: 'freeznAmount',
                align: "center",
                width: 45,
                formatter: function (value, options, row) {
                    if (value == 0 || value == null) {
                        return '0.00';
                    }
                    return value;
                },
                sortable: false
            },
            {label: '上月激活', name: 'activNum', align: "center", width: 60},
            {
                label: 'vip',
                name: 'thisGrade',
                align: "center",
                width: 40,
                formatter: function (value, options, row) {
                    return value;
                }
            },
            {
                label: '分润费率',
                name: 'agentId',
                align: "center",
                width: 45,
                formatter: function (value, options, row) {
                    return '<span class = "btn btn-success" onclick = "showRate(' + value + ')"> 查看 </span>';
                }
            },
            {
                label: '登录状态',
                name: 'state',
                align: "center",
                width: 60,
                formatter: function (value, options, row) {
                    return value == 2 ?
                        '<span class="label label-danger">禁用</span>' :
                        value == 1 ? '<span class="label label-success">正常</span>' : '<span class="label label-danger">禁止提现</span>';
                },
                sortable: false
            },
            {
                label: '验证状态',
                name: 'realName',
                align: "center",
                width: 50,
                sortable: false,
                formatter: function (value, options, row) {
                    return '<span class = "btn btn-success" onclick = "updateRealName(' + row.agentId + ',\'' + value + '\')"> ' + (value == 1 ? '已认证' : '未认证') + '</span>';
                }
            },
            {
                label: '账号创建时间',
                name: 'createTime',
                align: "center",
                index: "create_time",
                width: 70,
                sortable: false
            },
            {
                label: '操作', name: 'agentId', width: 100, formatter: function (value, options, row) {
                    return '<span class = "btn btn-warning" onclick = "forbidAgent(' + value + ')"> 封禁 </span>&nbsp;&nbsp;' +

                        '<span class = "btn btn-success" onclick = "toUpdate(' + value + ')"> 修改 </span>&nbsp;&nbsp;';
                }, sortable: false
            }

        ],
        viewrecords: true,
        height: 500,
        rowNum: 10,
        rowList: [10, 30, 50],
        rownumbers: true,
        rownumWidth: 25,
        autowidth: true,
        footerrow: true,
        pager: "#jqGridPager",
        jsonReader: {
            root: "page.list",
            page: "page.currPage",
            total: "page.totalPage",
            records: "page.totalCount"
        },
        prmNames: {
            page: "page",
            rows: "limit",
            order: "order"
        },
        gridComplete: function () {
            //隐藏grid底部滚动条
            $("#jqGrid").closest(".ui-jqgrid-bdiv").css({"overflow-x": "hidden"});
            //计算余额总额，置于表格底部
            var totalAmount = $("#jqGrid").getCol('totalAmount', false, 'sum');
            var availableAmount = $("#jqGrid").getCol('availableAmount', false, 'sum');
            var freeznAmount = $("#jqGrid").getCol('freeznAmount', false, 'sum');
            $("#jqGrid").footerData('set', {
                parentPhone: '当前页总计:',
                totalAmount: "<span style='color:red;'>" + totalAmount.toFixed(2) + "</span>",
                availableAmount: "<span style='color:red;'>" + availableAmount.toFixed(2) + "</span>",
                freeznAmount: "<span style='color:red;'>" + freeznAmount.toFixed(2) + "</span>"
            });
        }
    });
}